package com.jiepos.mpos.biz.analysis.controller;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import com.jiepos.mpos.biz.analysis.service.CustomVipService;
import com.jiepos.mpos.core.controller.BaseController;
import com.jiepos.mpos.core.entity.Pagination;

@Controller
@RequestMapping("customVip")
public class CustomVipController extends BaseController {

    @Autowired
    private CustomVipService customVipService;

    /**
     * 会员统计
     * @param request
     * @param response
     * @param pagination
     * @return
     */
    @RequestMapping("/getCustomVip.do")
    public ModelAndView getCustomVip(HttpServletRequest request, HttpServletResponse response, Pagination pagination){

        ModelAndView model = new ModelAndView("/module/analysis/custom_vip");
        return super.getDetail(request, response, model);
    }
    /**
     * 查询通道列表信息json数据
     * @param
     * @param
     * @return
     */
    @RequestMapping("/CustomVipList.do")
    public @ResponseBody
    Map getCustomVipList(HttpServletRequest request, HttpServletResponse response,
                                  String loc_dt_start, String loc_dt_end, String ins_cd,
                                  String ins_cn_nm  ) throws Exception{
        String  xmlData = customVipService.getCustomVip(request,loc_dt_start,loc_dt_end,ins_cd,ins_cn_nm);
        Map<String,String> map = new HashMap<String,String>();
        map.put("xmlData",xmlData);
        return map;
    }
}
